import java.util.Objects;

public class Student extends BaseEntity{
    private String studentName;
    private String studentID;
    private String studentGender;
    private String studentPhoneNumber;
    private String studentEdu;
    private String studentClass;
    private int violationNum;
    private int violationScore;

    public Student() {
    }

    public Student(String studentName, String studentID, String studentGender, String studentPhoneNumber, String studentEdu, String studentClass) {
        this.studentName = studentName;
        this.studentID = studentID;
        this.studentGender = studentGender;
        this.studentPhoneNumber = studentPhoneNumber;
        this.studentEdu = studentEdu;
        this.studentClass = studentClass;
        this.violationNum = 0;
        this.violationScore = 0;
    }

    public String getStudentEdu() {
        return studentEdu;
    }

    public void setStudentEdu(String studentEdu) {
        this.studentEdu = studentEdu;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getStudentID() {
        return studentID;
    }

    public void setStudentID(String studentID) {
        this.studentID = studentID;
    }

    public String getStudentGender() {
        return studentGender;
    }

    public void setStudentGender(String studentGender) {
        this.studentGender = studentGender;
    }

    public String getStudentPhoneNumber() {
        return studentPhoneNumber;
    }

    public void setStudentPhoneNumber(String studentPhoneNumber) {
        this.studentPhoneNumber = studentPhoneNumber;
    }

    public String getStudentClass() {
        return studentClass;
    }

    public void setStudentClass(String studentClass) {
        this.studentClass = studentClass;
    }

    public int getViolationNum() {
        return violationNum;
    }

    public void setViolationNum(int violationNum) {
        this.violationNum = violationNum;
    }

    public int getViolationScore() {
        return violationScore;
    }

    public void setViolationScore(int violationScore) {
        this.violationScore = violationScore;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(studentName, student.studentName) && Objects.equals(studentID, student.studentID) && Objects.equals(studentGender, student.studentGender) && Objects.equals(studentPhoneNumber, student.studentPhoneNumber) && Objects.equals(studentEdu, student.studentEdu) && Objects.equals(studentClass, student.studentClass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentName, studentID, studentGender, studentPhoneNumber, studentEdu, studentClass);
    }

    @Override
    public String toString() {
        return String.format("%-10s | %-10s | %-10s | %-15s | %-10s | %-10s | %-10d | %-10d",
                studentName, studentID, studentGender, studentPhoneNumber, studentEdu, studentClass, violationNum, violationScore);
    }
}
